package server

import (
	"context"
	"gitee.com/kmyss/gf-ex/yscmd"
)

type FlagHostBuilder struct {
	yscmd.FlagBuilderCore
}

func (b *FlagHostBuilder) Init(ctx context.Context, group ...string) {
	b.FlagBuilderCore.Init(ctx, group...)
	b.F.Short = "h"
	b.F.Long = "host"
	b.F.Description = `
        服务端监听地址`
	b.F.DefaultValue = "127.0.0.1:10100"
}

func FlagHost(ctx context.Context, group ...string) *yscmd.Flag {
	build := &FlagHostBuilder{}
	build.Init(ctx, group...)
	return build.Flag()
}
